3.7.53 \(\int \cos (c+d x) (a+b \tan (c+d x))^n \, dx\) [653]

Optimal. Leaf size=161 \[ \frac {F_1\left (1+n;\frac {3}{2},\frac {3}{2};2+n;\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right ) \cos ^3(c+d x) (a+b \tan (c+d x))^{1+n} \left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{3/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{3/2}}{b d (1+n)} \]

[Out]

AppellF1(1+n,3/2,3/2,2+n,(a+b*tan(d*x+c))/(a-(-b^2)^(1/2)),(a+b*tan(d*x+c))/(a+(-b^2)^(1/2)))*cos(d*x+c)^3*(a+
b*tan(d*x+c))^(1+n)*(1+(-a-b*tan(d*x+c))/(a-(-b^2)^(1/2)))^(3/2)*(1+(-a-b*tan(d*x+c))/(a+(-b^2)^(1/2)))^(3/2)/
b/d/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3593, 774, 138} \begin {gather*} \frac {\cos ^3(c+d x) \left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{3/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{3/2} (a+b \tan (c+d x))^{n+1} F_1\left (n+1;\frac {3}{2},\frac {3}{2};n+2;\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )}{b d (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*(a + b*Tan[c + d*x])^n,x]

[Out]

(AppellF1[1 + n, 3/2, 3/2, 2 + n, (a + b*Tan[c + d*x])/(a - Sqrt[-b^2]), (a + b*Tan[c + d*x])/(a + Sqrt[-b^2])
]*Cos[c + d*x]^3*(a + b*Tan[c + d*x])^(1 + n)*(1 - (a + b*Tan[c + d*x])/(a - Sqrt[-b^2]))^(3/2)*(1 - (a + b*Ta
n[c + d*x])/(a + Sqrt[-b^2]))^(3/2))/(b*d*(1 + n))

Rule 138

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[c^n*e^p*((b*x)^(m +
 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 774

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[(a + c*x^
2)^p/(e*(1 - (d + e*x)/(d + e*(q/c)))^p*(1 - (d + e*x)/(d - e*(q/c)))^p), Subst[Int[x^m*Simp[1 - x/(d + e*(q/c
)), x]^p*Simp[1 - x/(d - e*(q/c)), x]^p, x], x, d + e*x], x]] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a
*e^2, 0] &&  !IntegerQ[p]

Rule 3593

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[d^(2*
IntPart[m/2])*((d*Sec[e + f*x])^(2*FracPart[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2])), Subst[Int[(a + x)^n*(
1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] &&
 !IntegerQ[m/2]

Rubi steps

\begin {align*} \int \cos (c+d x) (a+b \tan (c+d x))^n \, dx &=\frac {\left (\cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {(a+x)^n}{\left (1+\frac {x^2}{b^2}\right )^{3/2}} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\left (\cos ^3(c+d x) \left (1-\frac {a+b \tan (c+d x)}{a-\frac {b^2}{\sqrt {-b^2}}}\right )^{3/2} \left (1-\frac {a+b \tan (c+d x)}{a+\frac {b^2}{\sqrt {-b^2}}}\right )^{3/2}\right ) \text {Subst}\left (\int \frac {x^n}{\left (1-\frac {x}{a-\sqrt {-b^2}}\right )^{3/2} \left (1-\frac {x}{a+\sqrt {-b^2}}\right )^{3/2}} \, dx,x,a+b \tan (c+d x)\right )}{b d}\\ &=\frac {F_1\left (1+n;\frac {3}{2},\frac {3}{2};2+n;\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right ) \cos ^3(c+d x) (a+b \tan (c+d x))^{1+n} \left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{3/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{3/2}}{b d (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 5.04, size = 341, normalized size = 2.12 \begin {gather*} \frac {2 \left (a^2+b^2\right )^2 (2+n) F_1\left (1+n;\frac {3}{2},\frac {3}{2};2+n;\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right ) \cos ^5(c+d x) (-i+\tan (c+d x)) (i+\tan (c+d x)) (a+b \tan (c+d x))^{1+n}}{(a-i b) (a+i b) b d (1+n) \left (2 \left (a^2+b^2\right ) (2+n) F_1\left (1+n;\frac {3}{2},\frac {3}{2};2+n;\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right )+3 \left ((a-i b) F_1\left (2+n;\frac {3}{2},\frac {5}{2};3+n;\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right )+(a+i b) F_1\left (2+n;\frac {5}{2},\frac {3}{2};3+n;\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right )\right ) (a+b \tan (c+d x))\right )} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Cos[c + d*x]*(a + b*Tan[c + d*x])^n,x]

[Out]

(2*(a^2 + b^2)^2*(2 + n)*AppellF1[1 + n, 3/2, 3/2, 2 + n, (a + b*Tan[c + d*x])/(a - I*b), (a + b*Tan[c + d*x])
/(a + I*b)]*Cos[c + d*x]^5*(-I + Tan[c + d*x])*(I + Tan[c + d*x])*(a + b*Tan[c + d*x])^(1 + n))/((a - I*b)*(a
+ I*b)*b*d*(1 + n)*(2*(a^2 + b^2)*(2 + n)*AppellF1[1 + n, 3/2, 3/2, 2 + n, (a + b*Tan[c + d*x])/(a - I*b), (a
+ b*Tan[c + d*x])/(a + I*b)] + 3*((a - I*b)*AppellF1[2 + n, 3/2, 5/2, 3 + n, (a + b*Tan[c + d*x])/(a - I*b), (
a + b*Tan[c + d*x])/(a + I*b)] + (a + I*b)*AppellF1[2 + n, 5/2, 3/2, 3 + n, (a + b*Tan[c + d*x])/(a - I*b), (a
 + b*Tan[c + d*x])/(a + I*b)])*(a + b*Tan[c + d*x])))

________________________________________________________________________________________

Maple [F]
time = 0.23, size = 0, normalized size = 0.00 \[\int \cos \left (d x +c \right ) \left (a +b \tan \left (d x +c \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(a+b*tan(d*x+c))^n,x)

[Out]

int(cos(d*x+c)*(a+b*tan(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*tan(d*x + c) + a)^n*cos(d*x + c), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*tan(d*x + c) + a)^n*cos(d*x + c), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{n} \cos {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))**n,x)

[Out]

Integral((a + b*tan(c + d*x))**n*cos(c + d*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*tan(d*x + c) + a)^n*cos(d*x + c), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \cos \left (c+d\,x\right )\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)*(a + b*tan(c + d*x))^n,x)

[Out]

int(cos(c + d*x)*(a + b*tan(c + d*x))^n, x)

________________________________________________________________________________________